package com.gnar.dis;

import com.gnar.dis.Sprite.type;

import android.graphics.Bitmap;
import android.graphics.Rect;

public class Bomb extends Sprite {

	public Bomb(Bitmap bitmap, float startPosX, float startPosY) {
		super(bitmap, startPosX, startPosY);
		spriteType = type.BOMB;
		mAccelY = 6;
	}
	
	@Override
	public void update(EventHandler event) {
		mPosY = mPosY + mAccelY;
		mRect.set((int)mPosX,(int)mPosY, (int)mPosX + (int)mImage.getWidth(), (int)mPosY + (int)mImage.getHeight());
		if (mPosY > 480 - mImage.getHeight()) {
			mAccelY = 0;
			spriteType = type.DEST_OB;
		}
	}
}
